package com.sjtu.feign;

import com.sjtu.web.Result;
import com.sjtu.web.form.ClientInfoForm;
import com.sjtu.web.search.ClientInfoSearch;
import com.sjtu.web.vo.ClientInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * nerine
 * 2/2/2020
 */
@FeignClient(contextId = "client-info", name = "SERVER-CORE")
public interface ClientInfoFeign {
    String PREFIX = "/core/client-info";
    @PostMapping(PREFIX + "/save")
    Result<?> save(@RequestBody ClientInfoForm form);
    @PostMapping(PREFIX + "/list")
    Result<?> list(@RequestBody ClientInfoSearch search);
    @GetMapping(PREFIX + "/detail/{id}")
    Result<ClientInfoVo> detail(@PathVariable String id);
}
